Word Designators

Contents|Index|Previous|Next
Word designators

A colon (:) separates the event designator from the word designator. It can be omitted if the word designator begins with a ˆ, $, * or %. Words are numbered from the beginning of the line, with the first word being denoted by a 0 (zero).

0 (zero)

The zero’th word. For many applications, this is the command word.

n

The n’th word.

ˆ

The first argument. that is, word 1.

$

The last argument.

%

The word matched by the most recent ?string? search.

x-y

A range of words; -y abbreviates 0-y.

*

All of the words, excepting the zero’th. This is a synonym for 1-$. It is not an error to use * if there is just one word in the event. The empty string is returned in that case.

Top|Contents|Index|Previous|Next